Skip to content

refactor: centralize plugin install state and fix reinstall edge cases#223

Merged
datlechin merged 2 commits intomainfrom
refactor/plugin-install-tech-debt
Mar 9, 2026
Merged

refactor: centralize plugin install state and fix reinstall edge cases#223
datlechin merged 2 commits intomainfrom
refactor/plugin-install-tech-debt

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Move isInstalling from InstalledPluginsView into PluginManager to prevent concurrent installs from any entry point (file picker, drag-and-drop, Finder double-click)
  • Extract replaceExistingPlugin(bundleId:) helper shared by both installBundle and installFromZip to properly unload/unregister old plugins on reinstall
  • Fix self-overwrite bug in installBundle when source URL is already in userPluginsDir
  • Add missing replaceExistingPlugin call in installFromZip (was only in installBundle)
  • Add CFBundleTypeExtensions to plugin document type for Finder association on fresh installs

Test plan

  • Reinstalling an already-loaded plugin replaces it without duplicating the entry in Settings > Plugins
  • Concurrent install attempts (e.g. drop while file picker install is running) are rejected
  • Installing a plugin that already exists in userPluginsDir by path doesn't crash from self-deletion
  • Zip-based plugin install still works correctly
  • .tableplugin files show TablePro as the default handler in Finder

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin merged commit dd791fd into main Mar 9, 2026
2 checks passed
@datlechin datlechin deleted the refactor/plugin-install-tech-debt branch March 9, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant